package com.example.textview.util;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

public class MyThreadSave extends Thread{


 public    List<Integer> mylist;

    private Imytnterface imytnterface;

    public volatile boolean exit = false;


    public void setImytnterface(Imytnterface imytnterface) {
        this.imytnterface = imytnterface;
    }
    @Override
    public void run() {
        super.run();

        int size=mylist.size();
        while (size>0){
            //do something
            size--;
            try {
                Thread.sleep(2*1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            Log.d("wwwwwww","11111111111");

            this.imytnterface.callback("msg"+ size,"D100");
        }


        this.imytnterface.callback("线程结束","D100");
    }
}
